<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%><%@page import="com.pignest.hotel.service.UserService"%>
<%String contextPath = request.getContextPath();%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">  
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<title><%=com.pignest.hotel.system.Config.getHotelName()%></title>
<script type="text/javascript" src="<%=contextPath%>/scripts/jquery.js"></script>
</head>
<body>

<%
UserService service = com.pignest.hotel.spring.Services.getUserService();
if (!service.isSuperUserInitialized()){
%>
<button style="margin:0 auto;;width:300px;height:100px;font-size:32px;">初始化</button>
<script type="text/javascript" src="<%=contextPath%>/dwr/interface/GlobalAjax.js"></script>
<script type="text/javascript" src="<%=contextPath%>/dwr/engine.js"></script>
<script type="text/javascript">
$(function(){
	$("button").click(function(){
		GlobalAjax.initializeUser(function(data){
			if (data) {
				alert("初始化成功, 请登录后立刻修改密码!");
			}
			window.location.href = 'login.jsp';
		});
	});
});
</script>
<%} %>
</body>
</html>
